package com.luxury.adpter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2016/10/12.
 */
public class Tablayou_ViewPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> mList=null;
    private  String[] mArrTabTile=null;
    public Tablayou_ViewPagerAdapter(FragmentManager fm , List<Fragment> _List, String[] _arrTabTile) {
        super(fm);
        this.mList=_List;
        this.mArrTabTile=_arrTabTile;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }

    @Override//拿到当前标题
    public CharSequence getPageTitle(int position) {
        return mArrTabTile[position];
    }
}
